Inbox Control |
This topic describes the Inbox control used in a user interface. |
The Inbox control is used to display the Process Platform Inbox in a user interface. To create associations between this control and any required model, you can use message map. The mapping defined between the control and the model is stored in a mapping object.
Schema
Process Platform XForms provide a schema for the Inbox control using which the task data in the Inbox can be mapped with a data source. Using the schema, you can easily access and bind data to the control. A sample of the schema is provided below:
<InboxControl> <Control type="target/all"> <!-- Provide Target types if the control type selected is 'target' --> <Target type="user/role/worklist/team"/> <!--Need not provide any elements if the control type is 'all'--> </Control> <Criteria> <Query xmlns="http://schemas.cordys.com/cql/1.0"> <And> <LE field="StartDate"> <Value>2016-06-04T11:09:32.32</Value> </LE> <GE field="StartDate"> <Value>2015-06-04T11:09:32.32</Value> </GE> </And> </Query> </Criteria> <TaskIdentifiers> <TaskIdentifierType id="" name=""/> </TaskIdentifiers> <OrderBy/> <ShowNonWorkableItems/> </InboxControl>
Schema Element |
Description |
Parameters |
Accepted input values |
---|---|---|---|
Control |
Refers to the type of the control from which the data should be retrieved |
The value for the type element can be
|
Based on the type provided, the parameters to be provided for the elements change. The following is the list of accepted input values for the elements:
|
Query |
Contains the CQL format query used to search the task |
And, Or, EQ, NQ, LT, LE, GT, GE, In, Like, Between, IsNull, Not (can be nested and repeated) |
|
TaskIdentifiers |
Contains the set of task identifier types used to search the task |
|
|
OrderBy |
Contains the parameter by which the search results are to be sorted. |
You can sort based on System attributes such as:
|
|
ShowNonWorkableItems |
Indicated whether the non-workable tasks for the user must be shown or not. |
Accepts boolean value.
|
In order to display details of a location in a window, you need to extend the schema by adding elements to the BusinessObject element of the schema. Open the message map of the model used in the control, right-click the Business Object element in the Target pane, and select Add element. A new node is added to schema. You can modify the node to define the new element.
Properties of the Control
The properties associated with the Inbox control define its behavior. You can set the ID of the Control either in the property sheet of the control or programmatically using the APIs.
Table 1. List of Properties
Design-time property |
Run-time property |
Description |
---|---|---|
ID |
id |
Provide the string that identifies the control on an XForm. If not specified, a unique ID is automatically generated. |
Target type |
Target Type can be role, team, worklist, or user. |
|
Target |
Target:
|
Methods of the Control
You can call the following methods to programmatically set the various properties that are available on the Inbox Composite Control.
Table 2. List of Methods
Design-Time Method |
Description |
---|---|
showTasksByTarget(sTargetType, sTargetValue) |
Retrieves all the tasks that are sent to the Target of type sTargetType and identified by sTargetValue, and displays them in the Inbox Composite Control. The following values are accepted for:
|
showAllMyTasks() |
Retrieves all the tasks pertaining to the current user and displays them in the Inbox Composite Control. |
getFilterXml() |
Returns an instance of the Inbox Composite Control schema for the current settings. |
setFilterXml(sControlXML) |
Retrieves all the tasks that satisfy the query settings provided by 'sControlXML' and displays them in the Inbox Composite Control. <InboxControl xmlns="http://schemas.cordys.com/notification/workflow/1.0"> <Control type="target"> <Target type="user/role/team/worklist">DN/ID</Target> </Control> <Criteria> <Query></Query> </Criteria> <TaskIdentifiers> <TaskIdentifierType/> </TaskIdentifiers> <OrderBy/> <ShowNonWorkableItems/> </InboxControl> |